<template>
	<view class="imgTitle">
		<image :src="img" mode="aspectFill" class="img"></image>
		<view class="fill"></view>
		<view class="text">
			<view class="title">{{title}}</view>
			<view class="body">{{info}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		props: {
			title: {
				type: String,
				default: "晚餐"
			},
			info: {
				type: String,
				default: ""
			},
			img: {
				type: String,
				default: ''
			}
		}
	}
</script>

<style lang="scss" scoped>
	.imgTitle {
		width: 100%;
		position: relative;
		height: 200upx;
		margin-bottom: 20upx;

		.img {
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			z-index: 10;
			width: 100%;
			height: 100%;
			overflow: hidden;
		}

		.fill {
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			z-index: 11;
			background-color: rgba(0, 0, 0, 0.6);
		}

		.text {
			position: absolute;
			top: 0;
			bottom: 0;
			left: 0;
			right: 0;
			z-index: 13;
			display: flex;
			justify-content: center;
			align-items: center;
			flex-direction: column;

			.title {
				color: #FFFFFF;
				font-weight: bold;
				text-align: center;
				font-size: 50upx;
				line-height: 70upx;
			}

			.body {
				text-align: center;
				color: #FFFFFF;
			}
		}
	}
</style>
